#ifndef GB28181_UTILS_H
#define GB28181_UTILS_H

#include <string>

namespace El {
namespace GB28181 {

// Utility functions for GB28181 protocol
class GB28181Utils {
public:
    // Generate unique call ID for SIP messages
    static std::string GenerateCallId();
    
    // Generate nonce for authentication
    static std::string GenerateNonce();
    
    // Calculate MD5 digest response for authentication
    static std::string CalculateResponse(const std::string &username,
                                       const std::string &realm,
                                       const std::string &password,
                                       const std::string &nonce,
                                       const std::string &method,
                                       const std::string &uri);
    
    // Remove quotes from string
    static std::string UnquoteString(const char* str);
    
    // Get current timestamp in GB28181 format
    static std::string GetTimestamp();
    
    // Generate SN (Serial Number) for messages
    static std::string GenerateSN();
};

} // namespace GB28181
} // namespace El

#endif // GB28181_UTILS_H